gtk-demo: Plug a big memory leak
authorMatthias Clasen <mclasen@redhat.com>
Fri, 7 Aug 2020 01:14:11 +0000 (21:14 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 7 Aug 2020 01:14:11 +0000 (21:14 -0400)
The colors demo was leaking all its colors. Oops.

demos/gtk-demo/listview_colors.c

index f809b73c1ba865ab7da05fc5464510c9d7a7d0d5..b63f2366e013bd49fa5f3eea100fba495b4c2edf 100644 (file)
@@ -226,7 +226,7 @@ gtk_color_set_property (GObject      *object,
       break;
 
     case PROP_COLOR:
-      self->color = *(GdkRGBA *) g_value_dup_boxed (value);
+      self->color = *(GdkRGBA *) g_value_get_boxed (value);
       rgb_to_hsv (&self->color, &h, &s, &v);
       self->h = round (360 * h);
       self->s = round (100 * s);